<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人信息 - ThinkPHP商城</title>
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    {include file="public/header" /}

    <div class="container mt-4">
        <h1>个人信息</h1>
        <?php if (!empty($user)): ?>
            <div class="card p-4">
                <p><strong>用户名:</strong> <?= $user->username ?></p>
                <p><strong>用户ID:</strong> <?= $user->id ?></p>
                <p><strong>角色:</strong> <?= $user->role ?></p>
                <p><strong>注册时间:</strong> <?= $user->create_time ?></p>
                </div>
        <?php else: ?>
            <div class="alert alert-danger">
                未找到您的个人信息，请尝试重新登录。
            </div>
        <?php endif; ?>

        <div class="mt-3">
            <a href="{:url('index')}" class="btn btn-primary">返回首页</a>
        </div>
    </div>

    {include file="public/footer" /}
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/bootstrap.bundle.min.js"></script>
</body>
</html>